const noteModel = require('../models/noteModel');

class Note {
    list(page_num, page_size) {
        return noteModel.list(page_num, page_size);
    }
    modify(note_text, id) {
        const date = new Date().toLocaleString()
        const createAt = date
        return noteModel.modify(note_text, createAt, id);
    }
    publish(note_text) {
        const date = new Date().toLocaleString()
        const createAt = date
        return noteModel.publish(note_text, createAt);
    }
    remove(id) {
        return noteModel.remove(id);
    }
    search(keyword) {
        return noteModel.search(keyword)
    }

}

module.exports = Note